#coding=utf-8
import re

'''
' [多行]2.8.1-1 成员变量统一用@property声明，不要直接为类增加属性
'''
def mzcc_udrule_mul2_8_1__1(bufferItem, lineContext):

    # 首行
    if lineContext.curLineNum == bufferItem.lineNum:
        results = re.findall(r"{", lineContext.curNspLine);
        if 0 != len(results):
            bufferItem.lineNum = lineContext.curLineNum + 1;
            return 1;
        else:
            return 2;

    # 其他行
    results = re.findall(r"^{", lineContext.curNspLine);
    if 0 != len(results):
        bufferItem.lineNum = lineContext.curLineNum + 1;
        return 1;

    # 过滤空行
    results = re.findall(r"^\n$", lineContext.curNspLine);
    if 0 == len(results):
        return 0;

    return 2;
